import { Input,Button} from 'antd';
import {useState} from 'react'
import { useHistory } from "react-router-dom";
import './index.scss'
export default function HashFind(props){
    const history=useHistory()
     console.log(props)
    const [hash,setHash]=useState('')
    function getHash(e){ //获取hash
        setHash(e.target.value)
    }
    function toSearchHash(){
        history.push({
            pathname:'/searchIndex'
        })
        console.log(history)
        
    }
    return(
      <div className='hashFind'>
          <Input  placeholder='输入收据索引 / 交易哈希' value={hash} onChange={getHash}/>
          <Button className='hashFind_find' onClick={toSearchHash}>查询</Button>
      </div>
    )
}